package com.jxtc.enterprise.admin.vo;

import com.jxtc.enterprise.common.entity.Company;
import com.jxtc.enterprise.common.vo.CompanyVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

@Schema(description = "Admin 端公司管理页面每一行的公司信息")
@Getter
@Setter
@ToString
@NoArgsConstructor
public class AdminViewCompanyDetailVO extends CompanyVO {

    @Schema(description = "HR 登录密码", example = "123456")
    private String password;

    @Schema(description = "公司地址", example = "南山区 xxx 园区 xx 栋 15 楼 1508")
    private String address;

    @Schema(description = "是否已经停止供餐（停止供餐时该值为 true）", example = "false")
    private Boolean stopFlag;

    @Schema(description = "公司图片链接")
    private AdminCompanyImageVO images;

    @Schema(description = "公司午餐配置信息")
    private AdminCompanyDeliveryInfoVO lunchSetting;

    @Schema(description = "公司晚餐配置信息")
    private AdminCompanyDeliveryInfoVO dinnerSetting;

    @Schema(description = "负责该公司业务的租户id")
    private String tenantId;

    @Schema(description = "负责该公司业务的租户名")
    private String tenantName;

    public AdminViewCompanyDetailVO(Company company, String tenantName) {
        super(company.getId(), company.getName(), company.getHrName(), company.getPhoneNumber());
        this.address = company.getAddress();
        this.password = company.getPassword();
        this.stopFlag = company.getStopFlag();
        this.tenantId = company.getTenantId();
        this.tenantName = tenantName;
    }
}
